package com.middle.common.result;

import java.util.List;

import com.github.pagehelper.PageInfo;

/**
 * 分页
 * @author KING
 *
 */
public class Page<T> {
	
	private int page;
	
	private int pageSize;
	
	private Long total;
	
	private List<T> result;

	public Page(int page, int pageSize, Long total, List<T> result) {
		super();
		this.page = page;
		this.pageSize = pageSize;
		this.total = total;
		this.result = result;
	}
	
	public Page(PageInfo<T> info) {
		this(info.getPageNum(),info.getPageSize(),info.getTotal(),info.getList());
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public Long getTotal() {
		return total;
	}

	public void setTotal(Long total) {
		this.total = total;
	}

	public List<T> getResult() {
		return result;
	}

	public void setResult(List<T> result) {
		this.result = result;
	}


}
